package dominio;

import java.util.ArrayList;

/**
 * Created by Rafael Simon Garcia on 11/14/13.
 */


class ReversePairsOperator{
    public static void Operate(ArrayList<? super GraphElement> nodes){
        int length = nodes.size();

        for(int i = 0; i <= length - 1 ; i += 2)
            nodes.add(i+1, (GraphElement)nodes.remove(i)); //ye olde switcharoo
    }
}
